﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BIS.Portal.Core.Base;
using BIS.Portal.Core.Global;

namespace BIS.Portal.Modules.CMS.Adm
{
    public partial class AdminCmsArticleIndependentUpdate_Settings : ControlSettingBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadSetting();
        }

        private void LoadSetting()
        {
            string pageName = GetControlSetting<string>(
                ModuleSettingNames.AdminCmsArticleIndependentUpdateControl.AdminCmsArticleIndependentUpdate_ContentPage,
                PortalContext.LanguageAlias);
            AdminPageAliasManagement.BindPageList(pageName, ddlPageChoice);

            txtFtpPath.Text = GetControlSetting<string>(
                ModuleSettingNames.AdminCmsArticleIndependentUpdateControl.AdminCmsArticleIndependentUpdate_UrlPopFileManagement,
                PortalContext.LanguageAlias
                );
        }
        public override void SaveSettings(Dictionary<string, string> settings)
        {
            SetControlSettingForAllLanguages(ddlPageChoice.ID, ModuleSettingNames.AdminCmsArticleIndependentUpdateControl.AdminCmsArticleIndependentUpdate_ContentPage, settings);
            SetControlSettingForAllLanguages(txtFtpPath.ID, ModuleSettingNames.AdminCmsArticleIndependentUpdateControl.AdminCmsArticleIndependentUpdate_UrlPopFileManagement, settings);
        }     
    }
}